// Copyright 2021-present StarRocks, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto2";

package starrocks;
option java_package = "com.starrocks.proto";

enum SnapshotTypePB {
    SNAPSHOT_TYPE_UNKNOWN = 0;
    SNAPSHOT_TYPE_INCREMENTAL = 1;
    SNAPSHOT_TYPE_FULL = 2;
}

message SnapshotMetaFooterPB {
    // See gensrc/thrift/types.thrift
    optional int32 format_version = 1;
    optional SnapshotTypePB snapshot_type = 2;
    optional int64 snapshot_version = 3;
    repeated int64 rowset_meta_offsets = 4;
    // delvec_segids[i] is the segment id of the i'th delete vector.
    repeated int64 delvec_segids = 5;
    // delvec_offsets[i] is the file offset of the i'th delete vector.
    repeated int64 delvec_offsets = 6;
    // delvec_versions[i] is the version of i'th delete vector.
    repeated int64 delvec_versions = 7;
    optional int64 tablet_meta_offset = 8;
    // 'dcg' means Delta Column Group
    // dcg_segids[i] is the segment id of the i'th delta column group list
    repeated int64 dcg_segids = 9;
    // dcg_offsets[i] is the file offset of the i'th delta column group list.
    repeated int64 dcg_offsets = 10;
}
